<template>
  <div>
    <AppHeader />
    <AppContent />
    <!-- {{ render(appContent) }} -->
    {{ user }}
  </div>
</template>
<script type="text/ecmascript-6">
import AppHeader from 'views/appHeader/appHeader'
import AppContent from 'views/appContent/appContent'
import User from 'views/user/user'
import Vue from 'vue'

export default {
  data() {
    return {
      appContent: AppContent,
      render: () => { },
      user: {}
    }
  },
  components: {
    AppHeader,
    AppContent
  },
  mounted() {
    //解决safari自带放大功能：阻止双击放大
    var lastTime = 0;
    document.addEventListener('touchstart', function (event) {
      if (event.touches.length > 1) {
        event.preventDefault();
      }
    });
    document.addEventListener('touchend', function (event) {
      var nowTime = (new Date()).getTime();
      if (nowTime - lastTime <= 300) {
        event.preventDefault();
      }
      lastTime = nowTime;
    }, false);

    // 解决safari自带放大功能：阻止双指放大
    document.addEventListener('gesturestart', function (event) {
      event.preventDefault();
    })
  },
}
</script>

<style lang="stylus" scoped ref="stylesheet/stylus"></style>
